//
//  ShakeViewController.m
//  wuliangye
//
//  Created by yeeyuntech on 16/10/26.
//  Copyright © 2016年 jarze. All rights reserved.
//

#import "ShakeViewController.h"
#import "UIView+Shake.h"
#import "UIView+SetRect.h"
@interface ShakeViewController ()

@end

@implementation ShakeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self setUp];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (void)setUp{
    UILabel *label      = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
    label.textAlignment = NSTextAlignmentCenter;
    label.center        = self.view.middlePoint;
    label.text          = @"😂";
    label.font          = [UIFont systemFontOfSize:100.f];
    [self.view addSubview:label];
    
//    NSArray *ary;
//    NSString *str;
    
    
    
//    static int i = 0;
//    switch (i++ % 4) {
//        case 0:
//            [label shakeWithOptions:SCShakeOptionsDirectionRotate | SCShakeOptionsForceInterpolationExpDown | SCShakeOptionsAtEndRestart | SCShakeOptionsAutoreverse force:0.15 duration:1 iterationDuration:0.03 completionHandler:nil];
//            break;
//
//        case 1:
//            [label shakeWithOptions:SCShakeOptionsDirectionHorizontal | SCShakeOptionsForceInterpolationNone | SCShakeOptionsAtEndContinue force:0.05 duration:1 iterationDuration:0.03 completionHandler:nil];
//            break;
//            
//        case 2:
//            [label shakeWithOptions:SCShakeOptionsDirectionHorizontalAndVertical | SCShakeOptionsForceInterpolationRandom | SCShakeOptionsAtEndContinue force:0.3 duration:1 iterationDuration:0.02 completionHandler:nil];
//            break;
//            
//        case 3:
//            [label shakeWithOptions:SCShakeOptionsDirectionRotate | SCShakeOptionsForceInterpolationExpDown | SCShakeOptionsAtEndRestart force:0.15 duration:0.75 iterationDuration:0.03 completionHandler:nil];
//            break;
//            
//        default:
//            break;
//    }
    
//    if (HAS_OPT(options, SCShakeOptionsDirectionHorizontalAndVertical)) {
   
    [label shake];
    
    
        
    
}

@end
